package com.qfmy.common.utils;

import java.util.Random;

/**
 * @author 清风明月
 * @Package com.qfmy.common.utils
 * @date 2025/9/9
 * @descriptio  验证码工具类
 */
public class CodeUtil {

    public static String getRandomCode(Integer length) {
        StringBuilder builder = new StringBuilder();
        Random random = new Random();
        for (int i = 0; i < length; i++) {
            int num = random.nextInt(10);
            builder.append(num);
        }
        return builder.toString();
    }
}
